package com.example.demo.service.impl;

import com.example.demo.mapper.StudentBadgeMapper;
import com.example.demo.mapper.entity.Badge;
import com.example.demo.mapper.entity.StudentBadge;
import com.example.demo.service.StudentBadgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Lucy
 * @create 2024-02-13 19:38
 */
@Service
public class StudentBadgeServiceImpl implements StudentBadgeService{

    @Autowired
    private StudentBadgeMapper mapper;
    @Override
    public int selectBadgeNumber(int studentId) {
        return mapper.selectBadgeNumber(studentId);
    }

    @Override
    public List<Badge> selectTypeBadge(int type) {
        return mapper.selectTypeBadge(type);
    }

    @Override
    public List<StudentBadge> selectStudentBadge(int studentId) {
        return mapper.selectStudentBadgeById(studentId);
    }

    @Override
    public StudentBadge selectStudentBadge(int studentId, int badgeId) {
        return mapper.selectStudentBadge(studentId, badgeId);
    }

    @Override
    public Badge selectBadgeById(int badgeId) {
        return mapper.selectBadgeById(badgeId);
    }

    @Override
    public List<Badge> selectBadgeByAttributeId(int attributeId) {
        return mapper.selectBadgeByAttributeId(attributeId);
    }

    @Override
    public Badge selectJuniorBadgeByAttributeId(int attributeId) {
        return mapper.selectJuniorBadgeByAttributeId(attributeId);
    }

}
